POST
/
toptimize
/
v1
/
retrieval
[Beta] Retrieve objects
curl --request POST \
  --url https://api.topsort.com/toptimize/v1/retrieval \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "slots": 5,
  "opaqueUserId": "u_9ske45",
  "seedProductIds": [
    "p_PJbnN",
    "p_ojng4"
  ],
  "mode": "all",
  "deviceType": [
    "mobile"
  ]
}'
{
  "objectType": "listing",
  "objects": [
    {
      "id": "p_xh90s",
      "value": 0.978
    },
    {
      "id": "p_12lp0",
      "value": 0.953
    },
    {
      "id": "p_ds7ui",
      "value": 0.877
    }
  ],
  "error": false
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Body

application/json

The context information for the predictions, including which metrics to predict.

The body is of type object.

Response

The retrieval results. Each retrieved products is accompanied by their relevancy score.

The response is of type object.